Skip to content

Conversation

@arnaud-lb
Copy link
Member

@arnaud-lb arnaud-lb commented Jan 21, 2026

See #20917 (comment)

  • gen_stub.php now behaves as if --force-regeneration was given
  • The -f / --force-regeneration options are removed (they are silently ignored, so it's backwards compatible).
  • Removed unused properties Context::$forceParse, Context::$forceRegeneration

Closes GH-20891.

@arnaud-lb arnaud-lb marked this pull request as ready for review January 21, 2026 18:12
@arnaud-lb arnaud-lb requested a review from kocsismate as a code owner January 21, 2026 18:12
Copy link
Member

@DanielEScherzer DanielEScherzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me

@TimWolla
Copy link
Member

I've taken the liberty to add a "Closes" for the other PR that I mentioned in my original comment the PR description.

@nikic
Copy link
Member

nikic commented Jan 21, 2026

IIRC the reason the stub hash exists is to not require PHP-Parser (which requires network to download) for non-dev builds of PHP. I think this change is going to break builds in environments that disable network access (i.e. typical distro build environments).

@bwoebi
Copy link
Member

bwoebi commented Jan 22, 2026

Using the stub hash is also very practical to avoid regenerating everything (which indeed takes a bit of time), when not directly addressing a single file. In the very most cases, not force regenerating is exactly what you want.

@thg2k
Copy link
Contributor

thg2k commented Jan 29, 2026

IIRC the reason the stub hash exists is to not require PHP-Parser (which requires network to download) for non-dev builds of PHP. I think this change is going to break builds in environments that disable network access (i.e. typical distro build environments).

I fully agree with @nikic, downloading the PHP-Parser bundle when not necessary is counter-productive.

You can't rely on the files timestamps to be correctly aligned, even when unpacking a dist tar.gz file. So depending on which file, between arginfo and stub, takes the fresher timestamp, you would end up with different outcomes.

Related to this, I just updated my PR #20891 to align the file timestamps even when hash check determines there is no need to regenerate.

@DanielEScherzer DanielEScherzer dismissed their stale review January 29, 2026 23:17

Concerns raised

@arnaud-lb
Copy link
Member Author

Thank you everyone for the feedback. I'm closing this.

@arnaud-lb arnaud-lb closed this Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants